package com.chezai.client.bean;

import com.chezai.client.utils.SpeechUtils;

import java.io.File;

/**
 * 语音提示
 * Created by likunyang on 2018/2/1.
 */

public enum Speech {
    //抓拍前3秒提示
    SNAPSHOT_REMIND("3秒后开始抓拍", SpeechUtils.getThreeCountTakePhotoPath()),
    //抓拍倒计时
    INVERTED_SECONDS("三[p500]二[p500]衣", SpeechUtils.getStudentCountDownVideoPath()),
    //抓拍成功
    SNAPSHOT_SUCESS("抓拍成功，请继续练车", SpeechUtils.getTakePhotoSucessPath()),
    //课堂超时4小时
    CLASS_OUT_TIME_FOUR_HOUR("课程时间已超时，请教练及时登出设备", SpeechUtils.getTimeOutFourHourAlert()),
    //课堂超时7小时
    CLASS_OUT_TIME_SEVEN_HOUR("课程时间已超时，将在三十秒后自动退出", SpeechUtils.getTimeOutFiveHourAlert()),
    //驶入围栏
    POLYGON_IN("您已驶入训练场，请继续学习", SpeechUtils.getDriveInFencePath()),
    //驶出围栏
    POLYGON_OUT("您已驶出训练场，请尽快驶入，否则学时无效", SpeechUtils.getDriveOutFencePath()),
    //设备定位长时间无效
    LOC_INVALID("定位长时间无效，设备将重启，不影响学时", SpeechUtils.getLocInvalid());

    private String msg;
    private String filePath;

    Speech(String msg, String filePath) {
        this.msg = msg;
        this.filePath = filePath;
    }

    public boolean isExist() {
        return new File(filePath).exists();
    }

    public String getMsg() {
        return msg;
    }

    public String getFilePath() {
        return filePath;
    }
}
